package HIR.graph;

import java.awt.Component;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.util.Vector;

import javax.swing.JFrame;

import HIR.relation.Table;

public class gFrame extends JFrame{
	GridBagConstraints c;
	private Vector gPanels;
	Table table;
	public gFrame(){
		
	}
	public  gFrame(int n , Table T){
		super ();
		this.table = T;
		int s = T.size();
		int r = Math.round(n/s);
		setLayout(new GridLayout(r,n));
		
		for (int k=0 ; k < s ; k++) {
			gPanel g = (gPanel) T.get(k,0);
		
			
			
			add((Component) g);
			
		}
	//	this.getContentPane().add((Component) g);
	//	this.getContentPane().add((Component) g);
	
	
		this.setSize(600, 300);
		
		this.setVisible(true);
		
		
	}

	public gFrame(gPanel g) {
		this.getContentPane().add((Component) g);
		
		this.setSize(600, 100);
		
		this.setVisible(true);
		// TODO Auto-generated constructor stub
	}

	private void organisegPanel() {
		
		
		// TODO Auto-generated method stub
		
	}

}
